package com.own.component.common.em;

import com.own.base.BaseResponseCode;
import lombok.AllArgsConstructor;

/**
 * CacheEnum
 *
 * @author chenxueli
 * @date 2021/2/26 13:58
 */
@AllArgsConstructor
@SuppressWarnings("all")
public enum IpExceptionEnum implements BaseResponseCode {

    DEFAULT("ip_error", "ip处理异常"),
    FORMAT_ERROR("FORMAT_ERROR", "ip格式错误"),
    IPV4_FORMAT_ERROR("ipv4_format_error", "ipv4格式错误"),
    IPV6_FORMAT_ERROR("ipv6_format_error", "ipv6格式错误");

    /**
     * 返回状态码
     */
    private final String code;

    /**
     * 描述
     */
    private final String desc;

    /**
     * 获取返回信息
     *
     * @return 返回code
     */
    @Override
    public String code() {
        return this.code;
    }

    /**
     * 获取描述
     *
     * @return 返回描述
     */
    @Override
    public String desc() {
        return this.desc;
    }

}
